package com.itheima.utils;

public class CurrentHolder {
    private static ThreadLocal<Integer> threadLocal = new ThreadLocal<>();

    public static Integer getUserId() {
        return threadLocal.get();
    }

    public static void setUserId(Integer userId) {
        threadLocal.set(userId);
    }
    public static void removeThread(){
        threadLocal.remove();
    }
}
